package cn.myjerry.flyWeight;

public class Client {
	public static void main(String[] args) {
		ChessFlyWeight chess1 = ChessFlyWeightFactory.getChess("red");
		ChessFlyWeight chess2 = ChessFlyWeightFactory.getChess("red");

		System.out.println(chess1);
		System.out.println(chess2);
		
		System.out.println("增加外部状态的处理+++++++++");
		chess1.display(new Coordinate(10, 10));
		chess1.display(new Coordinate(20, 20));
		
	}
}
